package mycom.example.gameview;

import java.util.ArrayList;

import android.content.Context;
import android.graphics.Canvas;
import android.view.View;

public class MyView extends View {

	Context mc;
	ArrayList<MyShape> arr = new ArrayList<MyShape>();

	public MyView(Context context) {
		super(context);
		mc = context;
		makeShape();
	}

	private void makeShape() {

		for (int i = 0; i < 10; i++) {
			arr.add(new MyShape());
			try {
				Thread.sleep(100);
			} catch (InterruptedException e) {
				// TODO Auto-generated catch block
				e.printStackTrace();
			}
			arr.get(i).start();
		}

	}

	@Override
	public void draw(Canvas canvas) {

		for (MyShape temp : arr) {
			temp.display(canvas);
			invalidate();
		}

	}
//	
//	@Override
//	protected void onDraw(Canvas canvas) {
//		// TODO Auto-generated method stub
//		super.onDraw(canvas);
//	}

}// Myview
